import ElementPlus from 'element-plus'
import { createI18n } from 'vue-i18n'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import en from 'element-plus/dist/locale/en.mjs'
import messages from '../utils/i18n'

const i18n = createI18n({
    locale: 'zh-cn',
    fallbackLocale: 'en',
    messages,
})

export default (app) => {
    app.use(ElementPlus, { locale: zhCn, size: 'small' })
    app.use(i18n)
}